package com.example.demo.dao;

import com.example.demo.entity.Banner;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BannerDao {

    Banner getById(Integer id);

    List<Banner> listByEntity(Banner banner);

    Banner getByEntity(Banner banner);

    List<Banner> listByIds(List<Integer> list);

    int insert(Banner banner);

    int insertBatch(List<Banner> list);

    int update(Banner banner);

    int updateByField(@Param("where") Banner where, @Param("set") Banner set);

    int updateBatch(List<Banner> list);

    int deleteById(Integer id);

    int deleteByEntity(Banner banner);

    int deleteByIds(List<Integer> list);

    int countAll();

    int countByEntity(Banner banner);

}
